home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilstem / unique / onceaday.exe / ONCEDOC.COM (.txt) < prev    next >
Encoding:
Graham's TXT2COM  |  1989-09-10  |  19.2 KB  |  332 lines

  1. ~0E
  2.                       ┌─────────────┐ ┌────────────┐┌─┐
  3.                       └┐           ┌┘ │    ┌──────┐└┘ │
  4.                        │           │  │    │      └───┘
  5.                        │           │  │    │          <tm>
  6.                        │           │  │    └─────────────┐
  7.                        │           │  └──────┐           │
  8.                        │           │         │           │
  9.                        │           │         │           │
  10.                        │           └─────────┘           │
  11.                        │  U n i q u e   S o f t w a r e  │
  12.                        └─────────────────────────────────┘                   ~02
  13.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~0F
  14.                  Full documentation and License for only $15.00              ~07
  15.                   (+$2 for 3.5"-720K disks if needed/requested)              ~02
  16.                   Unique Software   ::   Post Office Box 26613 
  17.                           Fort Worth, Texas 76126-0613 
  18.                CompuServe : 70130,330   ::   MCI-Mail : 252-8689
  19.                        American People Link : UNIQUESOFT                     ~07
  20.               ~87365~07day - ~8724~07hr Technical FAX Support - 1-817-249-4284
  21. ~0A
  22.                           -Press [PG DN] for next page-                      ~03
  23.  
  24.  
  25.                                        This program  is  produced by a member of 
  26.                                     the  Association of Shareware  Professionals 
  27.                                     (ASP).    ASP  wants to make sure  that  the 
  28.        ┌─────────┐      <tm>        shareware principle works for  you.  If  you 
  29.  ┌─────┴───┐     │                  are  unable  to resolve a  shareware-related 
  30. ─│         │o    │───────────────── problem with an ASP member by contacting the 
  31.  │   ┌─────┴╨──┐ │  Association of  member  directly,  ASP may be able to  help. 
  32.  │   │         │─┘  Shareware       The  ASP  Ombudsman  can help you resolve  a 
  33.  └───│    o    │    Professionals   dispute  or problem with an ASP member,  but 
  34. ─────│    ║    │─────────────────── does  not  provide  technical  support   for 
  35.      └────╨────┘    MEMBER          members'  products.  Please write to the ASP 
  36.                                     Ombudsman  at P.O.  Box 5786,  Bellevue,  WA 
  37.                                     98006   or  send a  Compuserve  message  via 
  38.                                     easyplex to ASP Ombudsman 70007,3536     ~02
  39.  
  40.     You should  inspect the file with the extension ".LST"  for a  list  of  the 
  41. programs which SHOULD be contained in this package and their size.           ~0A 
  42.  
  43.  
  44.                           -Press [PG DN] for next page-                      ~02
  45.  
  46.     Vendors,   User  Groups,   and  Schools must read the  file  VENDOR.DOC  for 
  47. important information relating to their use and distribution of this program.~03 
  48.     Shareware is  NOT mediocre  software  because it's inexpensive.  It has been 
  49. accurately estimated that research and development costs (programming) in a $500 
  50. program  package are less than $50.  You see, with Shareware you are  NOT PAYING 
  51. for fancy packages, costly advertising, and expensive distribution methods.  ~02 
  52.     Shareware  is  NOT FREE.  If you "buy"  a  disk full of software for  $3.95, 
  53. $5.00,   or  $9.99  all you have paid for is the disk,  the time for making  the 
  54. collection, and shipping and handling.                                       ~03 
  55.     The  Shareware author is still legally entitled to receive compensation  for 
  56. his work. Many programmers make their  living by distributing their programs via 
  57. Shareware.  The license fee/registration which you should send is a programmer's 
  58. paycheck.                                                                    ~02 
  59.     Shareware  gives  you  get  the ULTIMATE GUARANTEE,  "If you don't  use  the 
  60. product,   you don't pay for it!".  Try getting that guarantee with "commercial" 
  61. software.                                                                    ~02 
  62.     After you have used this program for ~0A30~02  days,  you must ~0ADISCONTINUE use  OR 
  63. PURCHASE ~02a single-user LICENSE from Unique Software.                      ~0A 
  64.  
  65. ~0A
  66.                           -Press [PG DN] for next page-                      ~02
  67.  
  68.     It's EASY to become a licensed user of this program, at your DOS prompt type 
  69. `LICENSE'  and answer the questions.  Your printer does all the work.  You don't 
  70. have to write anything. You don't even need an envelope!                     ~07 
  71.     VISA/MC registration is honored by the Public Software Library (800-2424-PSL 
  72. orders - Info 713-665-7017) and you get a $5 credit with PSL for later use.  ~03 
  73.     Licensed users get printed FULL documentation (when applicable)  and receive 
  74. free  technical support for a year.  Technical questions can be submitted to any 
  75. of the onlines  services or FAX'd.  (The numbers are listed on the  HOME  page.) 
  76.    [To request techical support,  the following is required:  free memory before 
  77. running program, printer type (when applic), resident programs, and a listing of 
  78. your AUTOEXEC.BAT and CONFIG.SYS files.]                                     ~02
  79.    This  software  and documentation are distributed and/or sold  "as  is"   and 
  80. without warranties as to performance of merchantability or  any other warranties 
  81. whether  expressed  or implied.  Because of  the various hardware  and  software 
  82. environments  into  which any program may be put,  no warranty of fitness for  a 
  83. particular purpose can be offered. Good data  processing procedure dictates that 
  84. any program  be  thoroughly tested  with non-critical data before relying on it. 
  85. The user must assume the entire risk of using the program.  Any liability of the 
  86. seller will be limited exclusively to product replacement.                      ~0A
  87.  
  88.                           -Press [PG DN] for next page-
  89. ~#0~0E
  90.                                 O N C E A D A Y
  91.                        Copyright 1989 by Unique Software
  92. ~03
  93.     ONCEADAY is a small and powerful BATch file utility that will allow you  to 
  94. run a file or a group of files only ONCEADAY! 
  95. ~02
  96.                          [F1] - Do it quick!
  97.  
  98.                          [F2] - What ONCEADAY cannot do
  99.  
  100.                          [F3] - Usage
  101.  
  102.                          [F4] - BATch file examples
  103.  
  104.                          [F5] - Misfeatures
  105.  
  106.                          [F6] - History
  107.  
  108.                          [F7] - Errata
  109.  
  110.                   { [F10] Return to this Menu from anywhere }
  111. ~#1~0E
  112.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  113.                          [F1] - D O   I T   Q U I C K !
  114. ~02
  115.     [1] Move ONCEADAY.COM to a directory which you have in your PATH statement! 
  116.  
  117.     [2] Create a BATch file called ONCE.BAT containing the following structure: 
  118.         ECHO OFF
  119.         ONCEADAY ONCE.BAT
  120.         IF NOT ERRORLEVEL=1 GOTO SKIPFILES
  121.         (place a list of
  122.                all the file that you
  123.                    wish to run only
  124.                         ONCEADAY in this area.)
  125.         :SKIPFILES
  126.  
  127.     [3] Type "ONCE"  -  you will note that ONCEADAY will annouce that "ONCE.BAT" 
  128. has been run today.  the reason for this is that ONCEADAY checks the date on the 
  129. file  and  compares it with the date set on your computer.  If you have  a  file 
  130. dating function,  change ONCE.BAT's date to the previous date. If you don't have 
  131. a  file dating function,  change your system DATE back a day,  create  ONCE.BAT, 
  132. then reset your system date back to normal. 
  133. ~#2~0E
  134.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  135.                          [F2] - What ONCEADAY cannot do
  136. ~02
  137.  
  138.    ONCEADAY cannot determine if a file created or modified on a certain day  has 
  139.  
  140.  
  141. been  run that day.  The reason for this is that ONCEADAY uses a file's date  in 
  142.  
  143.  
  144. comparison with the system date to determine if the reference file has been used 
  145.  
  146.  
  147. that particular day.  Remember anytime you open, use,  modify or any way alter a 
  148.  
  149.  
  150. file, DOS automatically updates it's date. 
  151.  
  152.  
  153.  
  154. ~02
  155. ~#3~0E
  156.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  157.                                 [F3] - U S A G E
  158. ~02
  159.     ONCEADAY [drive:][\path\]ref_file[.ext]                              ~03{a}~02    
  160.     IF ERRORLEVEL=1 <comand>                                             ~05{b}    
  161. ~02
  162.     Even  if you're a novice computer user,  BATch files should be  familiar  to 
  163. you.  Usually even the beginner has seen many references or actually looked into 
  164. the mysteries of AUTOEXEC.BAT. This is simply a BATch file that is run each time 
  165. the computer is booted (if DOS finds the file that is). A BATch file is simply a 
  166. file containing a listing of various command and/or programs you wish to run. 
  167.     (The  purpose  of  this  documentation is to explain the  use  of  ONCEADAY. 
  168. Therefore  explanations will be limited to the commands needed to  use  ONCEADAY 
  169. effectively.) 
  170.     ONCEADAY  checks  the date of the ref_file ~03{a}~02 and sets the ERRORLEVEL to  1 
  171. ONLY IF ref_file has NOT been run today!  ONCEADAY will also display this on the 
  172. screen.   The following statement ~05{b}~02 can then determine ONCEADAY's findings  by 
  173. using the ERRORLEVEL test and then a secondary command can be executed.   Simply 
  174. stated,  in the second line, ~05{b}~02, <command>  will be executed if ref_file in the 
  175. first line, ~03{a}~02, has NOT been run today. 
  176. ~02
  177. ~#4~0E
  178.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  179.                            [F4] - BATch file examples                        ~02
  180.  
  181.                 To run ONE program ONCEADAY use this BATch format
  182.     ONCEADAY [[drive:][\pathname\]]ref_file[.ext]
  183.     IF ERRORLEVEL=1 <file_you_want_to_run_ONCEADAY>
  184.  
  185.     Let's  say  you  use  PCTOOLS  DELUXE's  (by  Central  Point  Software Inc.) 
  186. MIRROR.COM  utility  in your AUTOEXEC.BAT file.  If you re-boot several times  a 
  187. day,  running MIRROR could waste a lot of time needlessly.  Using ONCEADAY  your 
  188. AUTOEXEC.BAT file will "know" when to run MIRROR but only ONCEADAY. For example:
  189.     PROMPT $p$g
  190.     REM set our DOS prompt
  191.     CLOCK GET
  192.     REM set the system time to the hardware clock
  193.     ONCEADAY \AUTOEXEC.BAT
  194.     REM check to see if we've run AUTOEXEC.BAT yet
  195.     IF ERRORLEVEL=1 MIRROR C:
  196.     REM run MIRROR only ONCEADAY
  197. ~0A
  198.                               [PGDN] for next page
  199. ~#4~0E
  200.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  201.                      [F4] - BATch file examples (continued)                  ~02
  202.  
  203.              To run SEVERAL programs ONCEADAY use this BATch format
  204.  
  205.     ONCEADAY [[drive:][\pathname\]]ref_file[.ext]
  206.     IF ~0FNOT~02 ERRORLEVEL=1 GOTO SKIP_FILES
  207.     {a file to run or BATch command}
  208.     {another file or command}
  209.     {another file or command}
  210.     :SKIP_FILES
  211.  
  212.     As you can see with this method you can run as many BATch commands or files 
  213. as you need. It is important to note that the ~0FNOT~02 modifier reverses the meaning 
  214. of the following BATch command. Therefore the command "GOTO SKIP_FILES" will be 
  215. executed if the ERRORLEVEL is ~0FNOT~02 1.
  216.  
  217.     If you've never seen or used a BATch file label or the GOTO BATch command 
  218. these are explained in a later BATch, [F4], page. 
  219. ~0A
  220.                               [PGDN] for next page
  221. ~#4~0E
  222.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  223.                      [F4] - BATch file examples (continued)                  ~02
  224.                                GOTO's and :labels
  225.  
  226.     On  the previous page we used the BATch file command GOTO.  GOTO  is  fairly 
  227. easy to understand.  When the BATch file interpreter "reads" a GOTO it scans the 
  228. rest  of  the  BATch file for a label name following the GOTO  command.   Simply 
  229. stated the GOTO format is:                                                      
  230.     GOTO label                                                                  
  231.     A label is any word,  name,  number,  etc that you wish preceded by a colon, 
  232. ":". For example:                                                               
  233.     GOTO jump_to_label                                   {the GOTO command here}
  234.     {other commands or files}                                     {will}        
  235.     :jump_to_label                                            {jump to here}    
  236.  
  237.     Note that the first eight characters are only significant but can be as long 
  238. as  you want.  Simply stated "GOTO jump_to_here"  and "GOTO jump_to_label"   are 
  239. equal to DOS,  "GOTO jump_to_".  Likewise, ":jump_to_label"  and ":jump_to_here" 
  240. are also equal to DOS, ":jump_to_". 
  241. ~0A
  242.                               [PGDN] for next page
  243. ~#5~0E
  244.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  245.                                [F5] - Misfeatures                            ~02
  246.  
  247.     ONCEADAY  has only one side-effect that could be considered a  "misfeature". 
  248. In order  for ONCEADAY to determine if the reference file has been run, ONCEADAY 
  249. updates  the reference file's date to the current system  date.
  250.  
  251.     You may wonder, "Why is this a misfeature?"
  252.  
  253.     We  forewarn  you  of  this because of the various  ways  that  many  BACKUP 
  254. programs determine that a file needs to be backed-up.  One way is by comparing a 
  255. file's date to another reference  date.   Therefore using ONCEADAY on a file may 
  256. "fool"   such a BACKUP program into thinking the file needs to be backed-up when 
  257. indeed it doesn't. 
  258.  
  259.     NOTE that ONCEADAY does NOT alter a file's attributes.  If a backup  program 
  260. uses the file's attributes for testing for backup, ONCEADAY will have no effect 
  261. on these type of BACKUP programs at all. 
  262.  
  263. ~0A
  264.                               [PGDN] for next page
  265. ~#5~0E
  266.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  267.  
  268.                          [F5] - Misfeatures (continued)                      ~02
  269.  
  270.     If you don't mind, or your BACKUP program doesn't mind, a  file having a new 
  271. date  every day,  then the reference file and the file to run can be one in  the 
  272. same.   Actually this will also give you the advantage of being able to visually 
  273. tell that a particular file has been run today.  For example (using the file our 
  274. previous example file MIRROR): 
  275.  
  276.     ONCEADAY C:\PCTOOLS\MIRROR
  277.     IF ERRORLEVEL=1 MIRROR C:
  278.  
  279.     To  keep  ONCEADAY  quiet inside a batch file you can redirect  it's  output 
  280. using the redirection flag, ">". Using the above example: 
  281.  
  282.     ONCEADAY C:\PCTOOLS\MIRROR > NUL
  283.     IF ERRORLEVEL=1 MIRROR C:
  284.  
  285. ~0A
  286.                               [PGDN] for next page
  287. ~#6~0E
  288.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  289.                                  [F6] - History                              ~02
  290.  
  291.  
  292.  
  293.     1.20·-·Change output so Redirection can be  applied  to  make ONCEADAY quite 
  294. when running. Fixed wording in help screen. Fixed minor bug in internal routine. 
  295.  
  296.  
  297.     1.10 - Reversed ERRORLEVEL now set ERRORLEVEL if file has NOT been run. Add 
  298. message as to whether file has been run today or not. 
  299.  
  300.  
  301.     1.00 - Initial  release.   Removed multiple errorlevel  setting  after  beta 
  302. reports.  Name changed from ONCE to ONCEADAY to prevent confusion. Trap file not 
  303. found error and report. 
  304.  
  305.  
  306.  
  307. ~0A
  308.                               [PGDN] for next page
  309. ~#7~0E
  310.                 ONCEADAY 1.20 - Copyright 1989 by Unique Software            ~03
  311.                                   [F7] - Errata                              ~02
  312.  
  313.                     Help US shape this program to your needs!
  314.  
  315.     Beside  the  fact  that supporting good shareware will  insure  future  good 
  316. shareware,   YOU  can participate in shaping this program.  Time and time  again 
  317. features  are  added  to  our programs because  YOU  the  users  have  suggested 
  318. improvements or changes you would like to see. 
  319.  
  320.  
  321.  
  322.                                 Bragging Rights!!
  323.  
  324.     Are you tired of a computer friend bragging about his $500 piece of software 
  325. that does this and that? Once registered, brag right back. Show him what you can 
  326. do  with YOUR software.  So he laughs and flashes his fancy printed  manual  and 
  327. colorful  cardboard  wrapper.  So flash back the $450+  that you saved by  using 
  328. shareware! 
  329.  
  330. ~0A
  331.                           >>> END of documentation <<<
  332.